#pragma once
#include "Article.h"
#include "ArticleException.h"

class News : public Article
{
private:
	string type;
public:

	News(void)
	{
	}

	News(int id, string date, string title, string writer, int n , string keyword, string type)
		: Article(id,date,title,writer,n,keyword)
	{
		this->type = type;
		if ( type == "" )
			throw ArticleException("Exception class news: Field type is an empty string");
	}

	string ToString() //Betyg 5
	{
		ostringstream oss;
		oss << Article::ToString();
		oss << "(" << type << ")" << endl;

		return oss.str();
	}

	~News(void)
	{
	}
};

